<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<div id="app1">
    <h1 v-if="ok">yes</h1>
    <h1 v-else>no</h1>

    <h1 v-if="type==='a'">显示a类型</h1>
    <h1 v-else-if="type==='b'">显示b类型</h1>
    <h1 v-else="type">不显示类型</h1>
</div>

<!--先导入Vue.js-->
<script src="https://cdn.jsdelivr.net/npm/vue@2.5.21/dist/vue.min.js"></script>
<script>
    let vo = new Vue({
        el: "#app1",
        data: {
            ok: true,
            type: 'c'
        }
    });
</script>

</body>
</html>